<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS-Corner-01</title>
</head>
<body>
    <style>
        body{
            padding: 0;
            margin: 100px 100px;
        }
        
        .pie{
            margin: 10px;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: conic-gradient(
                red 0, red 20%, 
                lightgreen 20%, green 50%,
                lightblue 50%, blue 80%,
                pink 80%, pink 100%
            )
        }

        .my-pie{
            margin: 10px;
            width: 200px;
            height: 200px;
            background-color: rgb(200, 200, 200);
        }

        p{
            margin: 10px;
        }

        .rainbow{
            width: 200px;
            height:200px;
            /* background-color: pink; */
            border-radius: 50%;

            box-shadow: 0 0 0 5px inset red, 0 0 0 10px inset orange, 0 0 0 15px inset yellow, 0 0 0 20px inset green, 0 0 0 25px inset lightblue, 0 0 0 30px inset blue, 0 0 0 35px inset purple;
            clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
        }

        .my-rainbow{
            width: 200px;
            height:200px;
            background-color: pink;
        }
    </style>

    <script>
        // 关于渐变：https://www.cnblogs.com/EnSnail/p/9771973.html
    </script>
    <hr>
    <h2>conic-gradient 圆锥形渐变</h2>
    <p>给div设样式，做成一个 Pie Chart 的图形效果：</p>
    <div class="pie"></div>
    <p>动手实践：F12里手写样式试试做出上面的效果：</p>
    <div class="my-pie"></div>

    <hr>
    <h2>line-gradient 线性渐变</h2>
    
    <hr>
    <h2>radial-gradient 径向渐变</h2>

    <hr>
    <h2>美丽的彩虹</h2>
    <div class="rainbow"></div>
    <p>动手实践：实现上面的彩虹桥：</p>
    <div class="my-rainbow"></div>
</body>
</html>